sgdk: vdp_dma.h File Reference

sgdk

- Main Page
- Related Pages
- Classes
- Files

- File List
- File Members

Defines | Functions
vdp_dma.h File Reference

VDP DMA support. More...

Go to the source code of this file.

## Defines

#define | VDP_DMA_VRAM 0
#define | VDP_DMA_CRAM 1
#define | VDP_DMA_VSRAM 2
#define | VDP_doVRamDMA(from, to, len) VDP_doDMA(VDP_DMA_VRAM, from, to, len)
#define | VDP_doCRamDMA(from, to, len) VDP_doDMA(VDP_DMA_CRAM, from, to, len)
#define | VDP_doVSRamDMA(from, to, len) VDP_doDMA(VDP_DMA_VSRAM, from, to, len)

## Functions

void | VDP_doDMAEx (u8 location, u32 from, u16 to, u16 len, s16 vramStep)
| Do DMA transfert operation.
void | VDP_doDMA (u8 location, u32 from, u16 to, u16 len)
| Do DMA transfert operation.
void | VDP_doVRamDMAFill (u16 to, u16 len, u8 value)
| Do VRAM DMA fill operation.
void | VDP_doVRamDMACopy (u16 from, u16 to, u16 len)
| Do VRAM DMA copy operation.

## Detailed Description

VDP DMA support.

Author:
  Stephane Dallongeville

Date:
  08/2011

This unit provides methods to use the VDP DMA capabilities.

## Define Documentation

#define VDP_DMA_CRAM 1

CRAM location for DMA operation.

#define VDP_DMA_VRAM 0

VRAM location for DMA operation.

#define VDP_DMA_VSRAM 2

VSRAM location for DMA operation.

#define VDP_doCRamDMA | ( |  | from,
|  |  | to,
|  |  | len
| ) |  | VDP_doDMA(VDP_DMA_CRAM, from, to, len)

Start DMA transfert to CRAM.

Parameters:

  from | Source address.
  to | Destination address in CRAM.
  len | Number of word to transfert.

#define VDP_doVRamDMA | ( |  | from,
|  |  | to,
|  |  | len
| ) |  | VDP_doDMA(VDP_DMA_VRAM, from, to, len)

Start DMA transfert to VRAM.

Parameters:

  from | Source address.
  to | Destination address in VRAM.
  len | Number of word to transfert.

#define VDP_doVSRamDMA | ( |  | from,
|  |  | to,
|  |  | len
| ) |  | VDP_doDMA(VDP_DMA_VSRAM, from, to, len)

Start DMA transfert to VSRAM.

Parameters:

  from | Source address.
  to | Destination address in VSRAM.
  len | Number of word to transfert.

## Function Documentation

void VDP_doDMA | ( | u8 | location,
|  | u32 | from,
|  | u16 | to,
|  | u16 | len
| ) |  |

Do DMA transfert operation.

Parameters:

  location

  Destination location.
  Accepted values:
  - VDP_DMA_VRAM (for VRAM transfert).
  - VDP_DMA_CRAM (for CRAM transfert).
  - VDP_DMA_VSRAM (for VSRAM transfert).

  from | Source address.
  to | Destination address.
  len | Number of word to transfert.

void VDP_doDMAEx | ( | u8 | location,
|  | u32 | from,
|  | u16 | to,
|  | u16 | len,
|  | s16 | vramStep
| ) |  |

Do DMA transfert operation.

Parameters:

  location

  Destination location.
  Accepted values:
  - VDP_DMA_VRAM (for VRAM transfert).
  - VDP_DMA_CRAM (for CRAM transfert).
  - VDP_DMA_VSRAM (for VSRAM transfert).

  from | Source address.
  to | Destination address.
  len | Number of word to transfert.
  vramStep | VRam address increment value (-1 to 255). By default you should set it to 2 for normal copy operation but you can use different value for specific operation. -1 means the VRam address increment register won't be modified (use current value).

void VDP_doVRamDMACopy | ( | u16 | from,
|  | u16 | to,
|  | u16 | len
| ) |  |

Do VRAM DMA copy operation.

Parameters:

  from | Source address.
  to | Destination address.
  len | Number of byte to copy.

void VDP_doVRamDMAFill | ( | u16 | to,
|  | u16 | len,
|  | u8 | value
| ) |  |

Do VRAM DMA fill operation.

Parameters:

  to | Destination address.
  len | Number of byte to fill.
  value | Fill value (byte).

All Classes Files Functions Variables Typedefs Enumerations Defines